@require('../../styles/themes/default.styl')
@require('../../styles/mixin.styl')

$select-width := unit(200 / 14, rem)
$select-height := unit($default-height / 14, rem)
$select-border := 1px solid $border-color
$select-bg-color := #fff
$select-font-size := $default-font-size
$select-padding-left-right := unit($mini-padding / 14, rem)
$select-focus-border := 1px solid $primary-color
$select-hover-border := 1px solid $dark-border-color

// for calculate
$select-icon-width = 10

$select-clear-margin-right := unit($icon-text-gutter / 14, rem)
$select-placeholder-color := $placeholder-color 

// disabled
$select-disabled-color := $disabled-color
$select-disabled-bg-color := $disabled-bg-color
$select-disabled-border-color := $disabled-border-color

// group
$select-group-label-color := $disabled-color
$select-group-label-padding := unit(8 / 14, rem)
// card-group
$select-card-group-height := unit(160 / 14, rem)
$select-card-group-item-hover-bg-color := transparent
$select-card-group-item-hover-color := $primary-color
$select-card-group-tab-padding := 0 unit(16 / 14, rem)

// multiple
$select-multiple-values-margin := unit(5 / 14, rem)
$select-multiple-tag-padding := unit(2 / 14, rem) unit(5 / 14, rem)
$select-multiple-tag-border-radius := $border-radius
$select-multiple-tag-margin := 0 unit(5 / 14, rem) unit(5 / 14, rem) 0
$select-multiple-tag-delete-icon-margin-left := unit(5 / 14, rem)
$select-multiple-tag-delete-icon-font-size := unit(20 / 14, rem)
$select-multiple-tag-bg-color := $disabled-bg-color
$select-multiple-tag-delete-icon-hover-color := $primary-color
$select-multiple-checkmark-font-size := unit(32 / 14, rem)

// size
$select-large-height := unit($large-height / 14, rem)
$select-large-font-size := $large-font-size 
$select-large-multiple-values-margin := unit(1 / 14, rem)
$select-large-multiple-tag-margin := 0 unit(2 / 14, rem) unit(1 / 14, rem) 0

$select-default-padding-left-right = $select-padding-left-right
$select-default-height = $select-height
$select-default-font-size = $select-font-size
$select-default-multiple-values-margin = $select-multiple-values-margin
$select-default-multiple-tag-margin = $select-multiple-tag-margin

$select-small-height := unit($small-height / 14, rem)
$select-small-font-size := $small-font-size 
$select-small-multiple-values-margin := unit(1 / 14, rem)
$select-small-multiple-tag-margin := 0 unit(2 / 14, rem) unit(1 / 14, rem) 0

$select-mini-height := unit($mini-height / 14, rem)
$select-mini-font-size := $mini-font-size 
$select-mini-multiple-values-margin := unit(1 / 14, rem)
$select-mini-multiple-tag-margin := 0 unit(2 / 14, rem) unit(1 / 14, rem) 0

for size in large default small mini
    if lookup('$select-' + size + '-padding-left-right')
        if !lookup('$select-' + size + '-prefix-padding-left')
            define('$select-' + size + '-prefix-padding-left', add(lookup('$select-' + size + '-padding-left-right'), 14, $icon-text-gutter))
        if !lookup('$select-' + size + '-suffix-padding-right')
            define('$select-' + size + '-suffix-padding-right', add(lookup('$select-' + size + '-padding-left-right'), 14, $icon-text-gutter))
        if !lookup('$select-' + size + '-clearable-suffix-padding-right')
            define('$select-' + size + '-clearable-suffix-padding-right', add(lookup('$select-' + size + '-padding-left-right'), 14, $icon-text-gutter, 14, $icon-text-gutter))

// if lookup('$select-' + size + '-padding-left')
// if !lookup('$select-' + size + '-padding-right')
// define('$select-' + size + '-padding-right', add(lookup('$select-' + size + '-padding-left'), $select-icon-width, $icon-text-gutter))
// if !lookup('$select-' + size + '-clearable-padding-right')
// define('$select-' + size + '-clearable-padding-right', add(lookup('$select-' + size + '-padding-left'), $select-icon-width * 2, $icon-text-gutter * 2))

// dropdown
$select-dropdown-max-height := unit(200 / 14, rem)
